css: Support CSS names for pseudo states
authorMatthias Clasen <mclasen@redhat.com>
Mon, 21 Dec 2015 13:26:58 +0000 (08:26 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 21 Dec 2015 13:26:58 +0000 (08:26 -0500)
What we call :insensitive is called :disabled in CSS, and
:inconsistent is :indeterminate. Recognize these names, but
still support the old ones.

gtk/gtkcssselector.c

index 0647c296ef0454a8f9e16a34de995dd364392179..0db8c368df8bc765525f77853918a4ad70f8146f 100644 (file)
@@ -736,8 +736,8 @@ print_pseudoclass_state (const GtkCssSelector *selector,
     "active",
     "hover",
     "selected",
-    "insensitive",
-    "inconsistent",
+    "disabled",
+    "indeterminate",
     "focus",
     "backdrop",
     "dir(ltr)",
@@ -1181,7 +1181,9 @@ parse_selector_pseudo_class (GtkCssParser   *parser,
     { "hover",        GTK_STATE_FLAG_PRELIGHT, },
     { "selected",     GTK_STATE_FLAG_SELECTED, },
     { "insensitive",  GTK_STATE_FLAG_INSENSITIVE, },
+    { "disabled",     GTK_STATE_FLAG_INSENSITIVE, },
     { "inconsistent", GTK_STATE_FLAG_INCONSISTENT, },
+    { "indeterminate",GTK_STATE_FLAG_INCONSISTENT, },
     { "focused",      GTK_STATE_FLAG_FOCUSED, },
     { "focus",        GTK_STATE_FLAG_FOCUSED, },
     { "backdrop",     GTK_STATE_FLAG_BACKDROP, },